<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script src="./libs/snap.svg-min.js"></script>
    <script>
      window.onload = function () {
        // 1.创建一个svg
        let svg = Snap(300, 300)
        console.log(svg === svg.paper)
        // 2.在svg中绘制一个圆
        let c = svg.circle(100, 100, 50)
        // 3.添加属性
        c.attr({
          fill: 'red',
        })
        // 4.将svg.node对象添加到body中
        document.body.appendChild(svg.node)
      }
    </script>
  </body>
</html>
